<?php

use yii\helpers\Html;
use yii\widgets\LinkPager;

/**
 * @var yii\web\View $this
 * @var amnah\yii2\user\Module $module
 * @var array $actions
 */

$module = $this->context->module;

$this->title = Yii::t('user', 'Yii 2 User');
?>
<div class="user-default-index">

    <style>
        .table thead>tr>th, .table thead>tr>td .form-control,.table tbody>tr>th, .table tfoot>tr>th, .table thead>tr>td, .table tbody>tr>td, .table tfoot>tr>td, .table thead>tr>td input{font-size:12px;line-height:20px;padding:3px;height:20px;}
    </style>

    <h1>Yii 2 User Module - <?= $module->getVersion(); ?></h1>
    <h3>Actions in this module</h3>

    <p>
        <em><strong>Note:</strong> Some actions may be unavailable depending on if you are logged in/out, or as an
            admin/regular user</em>
    </p>
    <p>
        <?php echo Html::a(Yii::t('region', 'Create Region'), ['create'], ['class' => 'btn btn-success']); ?>
    </p>

    <table class="table table-bordered">
        <tr>
            <th>区域名称</th>
            <th>区域类型</th>
        </tr>

        <?php foreach ($regions as $region): ?>

            <tr>
                <td>
                    <strong><?= $region->region_name ?></strong>
                </td>
                <td>
                    <?= $region->region_type_id ?>
                </td>
            </tr>

        <?php endforeach; ?>

    </table>
<?= LinkPager::widget(['pagination' => $pagination]) ?>
</div>
